Fixed Issue with Compress-PSResource not working when passed Relative Path to DestinationPath #1719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
fixes: #1715
This pull request introduces changes to the
Compress-PSResource
functionality, including updates to thePublishHelper.cs
file and the corresponding tests inCompressPSResource.Tests.ps1
. The primary focus is on enhancing the compression process and ensuring it works correctly with both absolute and relative paths.Enhancements to
Compress-PSResource
functionality:src/code/PublishHelper.cs
: Added logic to set theoutputNupkgDir
toDestinationPath
when the caller cmdlet isCompressPSResource
. ([src/code/PublishHelper.csR297-R301](https://github.com/PowerShell/PSResourceGet/pull/1719/files#diff-de173e5cd669c3f87b931f1b38ebaa7633861e9c809176f0cec1735585d68549R297-R301)
)Updates to tests:
test/PublishPSResourceTests/CompressPSResource.Tests.ps1
: Added a new test case to verify the compression of a script into a.nupkg
file. ([test/PublishPSResourceTests/CompressPSResource.Tests.ps1R194-R244](https://github.com/PowerShell/PSResourceGet/pull/1719/files#diff-8214d34f8b6d7fd40d95dab82c9c569dd62919c12ac16e599af4255985a15cb7R194-R244)
)test/PublishPSResourceTests/CompressPSResource.Tests.ps1
: Added a test case to ensure thatCompress-PSResource
works correctly when using relative paths for the-DestinationPath
parameter. ([test/PublishPSResourceTests/CompressPSResource.Tests.ps1R194-R244](https://github.com/PowerShell/PSResourceGet/pull/1719/files#diff-8214d34f8b6d7fd40d95dab82c9c569dd62919c12ac16e599af4255985a15cb7R194-R244)
)PR Context
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.